home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus 2000 #4 / Amiga Plus CD - 2000 - No. 4.iso / Tools / WWW / MiamiDeluxe / Install_MiamiDx < prev    next >
Encoding:
Text File  |  2000-05-27  |  13.4 KB  |  529 lines

  1. ; $VER: Install_MiamiDx 1.0c (10.04.2000)
  2. (procedure P-check-system-version
  3.  (if (< (/ @installer-version 65536) 43)
  4.   (abort "The MiamiDx installation script needs Installer\n"
  5.    "version 43 or higher. It is available from Aminet\n"
  6.    "and from www.nordicglobal.com")
  7.  )
  8.  (set #exec-version (/ (getversion) 65536))
  9.  (if (< #exec-version 37)
  10.   (abort "MiamiDx needs Kickstart 2.04 or higher.\n")
  11.  )
  12.  (if (< #exec-version 39)
  13.   (set #ag-browser "AmigaGuide")
  14.   (set #ag-browser "MultiView")
  15.  )
  16.  (set #wb-version (/ (getversion "LIBS:workbench.library") 65536))
  17. )
  18.  
  19. (procedure P-select-destination-directory
  20.  (if (exists "Miami:" (noreq))
  21.   (
  22.    (set #old-miami-assign 1)
  23.    (set #old-miami-assign-location (expandpath "Miami:"))
  24.    (set @default-dest
  25.     (askdir
  26.      (prompt "Select the directory where you want to "
  27.       "install MiamiDx. You already have a 'Miami:' "
  28.       "assign on your system, so it is assumed that this "
  29.       "is the location of an older version of Miami or MiamiDx that "
  30.       "you want to upgrade.")
  31.      (help "Select the directory where you want to "
  32.       "install MiamiDx. Since you already have a 'Miami:' "
  33.       "assign on your system you should probably accept "
  34.       "the default.")
  35.      (default "Miami:")
  36.     )
  37.    )
  38.   ) (
  39.    (set #old-miami-assign 0)
  40.    (if (exists "Work:" (noreq))
  41.     (set @default-dest "Work:")
  42.     (set @default-dest "SYS:")
  43.    )
  44.    (set @default-dest
  45.     (askdir
  46.      (prompt "Select the directory where you want to "
  47.       "install MiamiDx. An additional directory "
  48.       "will *NOT* be created at the location you specify.")
  49.      (help "Select the directory where you want to "
  50.       "install MiamiDx. All necessary files will be copied "
  51.       "to that directory during installation. A new directory "
  52.       "will *NOT* be created at the location you specify. "
  53.       "This means if you want MiamiDx to be installed in its "
  54.       "own directory then you need to create that directory "
  55.       "yourself first.")
  56.      (default @default-dest)
  57.     )
  58.    )
  59.   )
  60.  )
  61.  (makeassign "Miami" @default-dest)
  62. )
  63.  
  64. (procedure P-select-binary
  65.  (set #cpu-choice (if (patmatch "(68000|68010)" (database "cpu")) 0 1))
  66.  (if (= #cpu-choice 0)
  67.   (abort "The current version of MiamiDx requires a 68020\n"
  68.    "or higher CPU. A version for 68000/010 may be\n"
  69.    "available at a later time.")
  70.  )
  71. )
  72.  
  73. (procedure P-select-guis
  74.  (set #gui-options
  75.   (askoptions
  76.    (prompt "Please select which GUI modules you want to use with MiamiDx. The "
  77.     "MUI module requires MUI 3.8 or higher, which has to be installed "
  78.     "BEFORE installing MiamiDx.")
  79.    (help "MiamiDx supports several different user interface engines, "
  80.     "but at the moment only the MUI version is available")
  81.    (choices "MUI")
  82.   )
  83.  )
  84.  (if (= #gui-options 0)
  85.   (abort "You need to install at least one GUI module.")
  86.  )
  87.  (if (not (= 0 (BITAND #gui-options 3))) (
  88.   (if (not (exists "MUI:Libs/muimaster.library" (noreq)))
  89.    (abort "You need to install MUI 3.8 before you can install GUI "
  90.     "modules for MiamiDx.")
  91.   )
  92.   (if (< (/ (getversion "MUI:Libs/muimaster.library") 65536) 18)
  93.    (abort "Your installed MUI version is too old for MiamiDx. "
  94.     "Please upgrade to MUI 3.8 or higher before installing MiamiDx."
  95.    )
  96.   )
  97.  ))
  98. )
  99.  
  100. (procedure P-select-sana
  101.  (set #sana-choice
  102.   (askbool
  103.    (prompt "Do you want to install sanamni.device in\n"
  104.     "DEVS:Networks ? That device allows you to use\n"
  105.     "some third-party software like Envoy with MNI\n"
  106.     "drivers.")
  107.    (help "MiamiDx supports 'MNI', a new driver standard\n"
  108.     "for Ethernet. sanamni.device allows you to use\n"
  109.     "these new drivers with some older third-party\n"
  110.     "software such as Envoy that usually requires\n"
  111.     "SANA-II drivers")
  112.   )
  113.  )
  114. )
  115.  
  116. (procedure P-check-gui
  117.  (if (not (exists (tackon #source-dir #current-gui)))
  118.   (abort "Before you can install MiamiDx you first need to\n"
  119.    "download and unpack the archives that contain the MiamiDx\n"
  120.    "GUI modules you want to install.")
  121.  )
  122. )
  123.  
  124. (procedure P-check-guis
  125.  (if (= 1 (BITAND #gui-options 1)) (
  126.   (set #current-gui "MUI")
  127.   (P-check-gui)
  128.  ))
  129. )
  130.  
  131.  
  132. (procedure P-select-gui
  133.  (if (= 1 (BITAND #gui-options 1))
  134.   ((set #gui-choice-mui "MUI") (set #gui-choice 0))
  135.   (set #gui-choice-mui "")
  136.  )
  137.  (set #gui-choice
  138.   (askchoice
  139.    (prompt "Please select which GUI module you want to use as the default "
  140.     "module for MiamiDx")
  141.    (help "MiamiDx supports several different user interface engines, "
  142.     "but at the moment only the MUI module is available.")
  143.    (choices #gui-choice-mui)
  144.    (default #gui-choice)
  145.   )
  146.  )
  147.  (set #gui-choice-name (select #gui-choice "MUI"))
  148. )
  149.  
  150. (procedure P-select-icon
  151.  (if (>= #wb-version 44)
  152.   (set #icon-choice-os35 "OS 3.5")
  153.   (set #icon-choice-os35 "")
  154.  )
  155.  (set #icon-choice
  156.   (askchoice
  157.    (prompt "Please select which icons you\nwant to use for MiamiDx and\n"
  158.     "the utility programs:")
  159.    (help "MiamiDx comes with four different\nicon styles. Please select\n"
  160.     "the one you prefer.")
  161.    (choices "do not install new icons" "standard" "Magic Workbench" "NewIcons"
  162.     #icon-choice-os35)
  163.   )
  164.  )
  165. )
  166.  
  167. (procedure P-copy-file
  168.  (copyfiles
  169.   (source (tackon #source-dir #to-copy))
  170.   (dest @default-dest)
  171.   (optional force)
  172.  )
  173. )
  174.  
  175. (procedure P-set-tooltypes
  176.  (if (not (= #icon-choice 0)) (
  177.   (tooltype
  178.    (dest (tackon @default-dest "MiamiDx"))
  179.    (noposition)
  180.   )
  181.   (tooltype
  182.    (dest (tackon @default-dest "MiamiInit"))
  183.    (noposition)
  184.   )
  185.   (tooltype
  186.    (dest (tackon @default-dest "MiamiRegister"))
  187.    (noposition)
  188.   )
  189.   (tooltype
  190.    (dest (tackon @default-dest "MiamiDx.guide"))
  191.    (noposition)
  192.    (setdefaulttool #ag-browser)
  193.   )
  194.  ))
  195. )
  196.  
  197. (procedure P-add-to-startup
  198.  (if #old-miami-assign
  199.   (if (= #old-miami-assign-location (expandpath @default-dest))
  200.    (set #change-startup 0)
  201.    (set #change-startup 1)
  202.   )
  203.   (set #change-startup 1)
  204.  )
  205.  (if #change-startup
  206.   (
  207.    (set #startup-addition (cat
  208.     "assign Miami: \"" (expandpath @default-dest) "\"\n"
  209.     )
  210.    )
  211.    (if
  212.     (askbool
  213.      (prompt "It is NECESSARY that an assign "
  214.       "'Miami:' is created for the MiamiDx installation "
  215.       "directory. Would you like Installer "
  216.       "to make the required change to your user-startup "
  217.       "file ? If you answer 'No' then you need to make the "
  218.       "addition yourself, manually, before you can use MiamiDx.")
  219.      (help "It is NECESSARY that an assign "
  220.       "'Miami:' is created for the MiamiDx installation "
  221.       "directory. Would you like Installer "
  222.       "to make the required change to your user-startup "
  223.       "file ? If you answer 'No' then you need to make the "
  224.       "addition yourself, manually, before you can use MiamiDx. "
  225.       "You should only answer with 'No' if you prefer to edit "
  226.       "the user-startup file yourself. If you answer 'No' then "
  227.       "a file 'addition-to-user-startup' will be created in the "
  228.       "MiamiDx installation directory instead. You need to add the "
  229.       "contents of that file to your user-startup file.")
  230.      (choices "Yes" "No")
  231.     )
  232.     (startup "Miami"
  233.      (command #startup-addition)
  234.      (prompt "Installer will modify your s:user-startup "
  235.       "script. The following lines will be added:\n\n"
  236.       #startup-addition)
  237.      (help "Installer will modify your s:user-startup "
  238.       "script. The following lines will be added:\n\n"
  239.       #startup-addition)
  240.     )
  241.     (textfile
  242.      (dest (tackon @default-dest "addition-to-user-startup"))
  243.      (append #startup-addition)
  244.     )
  245.    )
  246.   )
  247.  )
  248. )
  249.  
  250. (procedure P-set-envvars
  251.  
  252.  (set #env-equal-envarc (= (expandpath "ENV:") (expandpath "ENVARC:")))
  253.  (if (not (exists "ENV:MIAMI"))
  254.   (makedir "ENV:MIAMI")
  255.  )
  256.  (if (not #env-equal-envarc)
  257.   (if (not (exists "ENVARC:MIAMI"))
  258.    (makedir "ENVARC:MIAMI")
  259.   )
  260.  )
  261.  (textfile
  262.   (dest "ENV:MIAMI/GUI")
  263.   (append #gui-choice-name)
  264.  )
  265.  (if (not #env-equal-envarc)
  266.   (copyfiles
  267.    (source "ENV:MIAMI/GUI")
  268.    (dest "ENVARC:MIAMI")
  269.   )
  270.  )
  271. )
  272.  
  273.  
  274. (welcome "Welcome to the MiamiDx 1.0 installation.\n")
  275.  
  276. (set app-name "MiamiDx 1.0")
  277.  
  278. (P-check-system-version)
  279.  
  280. (if @pretend
  281.   (abort "Pretend mode cannot be used with this\n"
  282.    "installation script.")
  283. )
  284.  
  285. (complete 0)
  286.  
  287. (set #source-dir (if (= 1 (exists @icon)) (pathonly (expandpath @icon))
  288.  (expandpath @icon))
  289. )
  290.  
  291. (P-select-destination-directory)
  292.  
  293. (complete 5)
  294.  
  295. (P-select-binary)
  296.  
  297. (complete 10)
  298.  
  299. (P-select-icon)
  300.  
  301. (complete 15)
  302.  
  303. (P-select-guis)
  304.  
  305. (P-select-gui)
  306.  
  307. (P-check-guis)
  308.  
  309. (P-select-sana)
  310.  
  311. (complete 20)
  312.  
  313. ; start actual installation
  314.  
  315. ; delete obsolete files from older Miami versions
  316. (delete (tackon @default-dest "MiamiRemind.doc") (optional force))
  317. (delete (tackon @default-dest "MiamiInitSANA2") (optional force) (infos))
  318. (delete (tackon @default-dest "Miami.000") (optional force) (infos))
  319. (delete (tackon @default-dest "Miami.020") (optional force) (infos))
  320. (delete (tackon @default-dest "Miami.eval") (optional force) (infos))
  321.  
  322. (complete 25)
  323.  
  324. ; copy MiamiDx binary selected by user
  325. (copyfiles
  326.  (source (tackon #source-dir "main/MiamiDx"))
  327.  (dest @default-dest)
  328.  (optional force)
  329. )
  330.  
  331. (complete 30)
  332.  
  333. ; copy individual files
  334. (set #to-copy "main/MiamiDx.guide") (P-copy-file)
  335. (set #to-copy "main/MiamiAddr") (P-copy-file)
  336. (set #to-copy "main/MiamiArp") (P-copy-file)
  337. (set #to-copy "main/MiamiDiG") (P-copy-file)
  338. (set #to-copy "main/MiamiDNSQuery") (P-copy-file)
  339. (set #to-copy "main/MiamiDod") (P-copy-file)
  340. (set #to-copy "main/MiamiFinger") (P-copy-file)
  341. (set #to-copy "main/MiamiFtp") (P-copy-file)
  342. (set #to-copy "main/MiamiHost") (P-copy-file)
  343. (set #to-copy "main/MiamiIfConfig") (P-copy-file)
  344. (set #to-copy "main/MiamiInit") (P-copy-file)
  345. (set #to-copy "main/MiamiIPFW") (P-copy-file)
  346. (set #to-copy "main/MiamiIPNatD") (P-copy-file)
  347. (complete 40)
  348. (set #to-copy "main/MiamiMapMBone") (P-copy-file)
  349. (set #to-copy "main/MiamiMRInfo") (P-copy-file)
  350. (set #to-copy "main/MiamiMRouteD") (P-copy-file)
  351. (set #to-copy "main/MiamiMTrace") (P-copy-file)
  352. (set #to-copy "main/MiamiNetStat") (P-copy-file)
  353. (set #to-copy "main/MiamiNSLookup") (P-copy-file)
  354. (set #to-copy "main/MiamiPing") (P-copy-file)
  355. (set #to-copy "main/MiamiRegister") (P-copy-file)
  356. (complete 50)
  357. (set #to-copy "main/MiamiRemind") (P-copy-file)
  358. (set #to-copy "main/MiamiResolve") (P-copy-file)
  359. (set #to-copy "main/MiamiRoute") (P-copy-file)
  360. (set #to-copy "main/MiamiSecureShellKeygen") (P-copy-file)
  361. (set #to-copy "main/MiamiSecureShellKill") (P-copy-file)
  362. (set #to-copy "main/MiamiSysCtl") (P-copy-file)
  363. (set #to-copy "main/MiamiTCPDump") (P-copy-file)
  364. (set #to-copy "main/MiamiTelnet") (P-copy-file)
  365. (set #to-copy "main/MiamiTelnetD") (P-copy-file)
  366. (set #to-copy "main/MiamiTraceRoute") (P-copy-file)
  367.  
  368. (complete 60)
  369.  
  370. ; copy libraries
  371. (if (not (exists (tackon @default-dest "Libs")))
  372.  (makedir (tackon @default-dest "Libs"))
  373. )
  374. (copyfiles
  375.  (source (tackon #source-dir "main/Libs"))
  376.  (dest (tackon @default-dest "Libs"))
  377.  (optional force)
  378.  (all)
  379. )
  380.  
  381. (complete 62)
  382.  
  383. ; copy MNI drivers
  384. (if (not (exists (tackon @default-dest "MNI")))
  385.  (makedir (tackon @default-dest "MNI"))
  386. )
  387. (copyfiles
  388.  (source (tackon #source-dir "main/MNI"))
  389.  (dest (tackon @default-dest "MNI"))
  390.  (optional force)
  391.  (all)
  392. )
  393.  
  394. (complete 64)
  395.  
  396. ; copy devices
  397. (if (not (exists (tackon @default-dest "Devs")))
  398.  (makedir (tackon @default-dest "Devs"))
  399. )
  400. (copyfiles
  401.  (source (tackon #source-dir "main/Devs"))
  402.  (dest (tackon @default-dest "Devs"))
  403.  (optional force)
  404.  (all)
  405. )
  406.  
  407. (complete 66)
  408.  
  409. ; copy sanamni.device
  410. (if #sana-choice (
  411.  (if (not (exists "DEVS:Networks"))
  412.   (makedir "DEVS:Networks")
  413.  )
  414.  (copyfiles
  415.   (source (tackon #source-dir "main/SANA2"))
  416.   (dest "DEVS:Networks")
  417.   (optional force)
  418.   (all)
  419.  )
  420. ))
  421.  
  422. (complete 68)
  423.  
  424. ; copy PC files
  425. (if (not (exists (tackon @default-dest "PC")))
  426.  (makedir (tackon @default-dest "PC"))
  427. )
  428. (copyfiles
  429.  (source (tackon #source-dir "main/PC"))
  430.  (dest (tackon @default-dest "PC"))
  431.  (optional force)
  432.  (all)
  433. )
  434.  
  435. (complete 70)
  436.  
  437. ; copy GUI modules
  438. (if (= 1 (BITAND #gui-options 1)) (
  439.  (copyfiles
  440.   (source (tackon #source-dir "MUI/MUI.MiamiDxGui"))
  441.   (dest (tackon @default-dest "Libs"))
  442.   (optional force)
  443.  )
  444.  (copyfiles
  445.   (source (tackon #source-dir "MUI/MUI.MiamiToolsGui"))
  446.   (dest (tackon @default-dest "Libs"))
  447.   (optional force)
  448.  )
  449. ))
  450.  
  451. (complete 80)
  452.  
  453. ; set icons
  454.  
  455. (if (not (= #icon-choice 0)) (
  456.  (set #to-copy
  457.   (select #icon-choice
  458.    ""
  459.    "main/Icons/Standard/MiamiDx.info"
  460.    "main/Icons/MagicWB/MiamiDx.info"
  461.    "main/Icons/NewIcons/MiamiDx.info"
  462.    "main/Icons/OS3.5/MiamiDx.info"
  463.   )
  464.  )
  465.  (copyfiles
  466.   (source (tackon #source-dir #to-copy))
  467.   (dest @default-dest)
  468.  )
  469.  (copyfiles
  470.   (source (tackon #source-dir #to-copy))
  471.   (dest @default-dest)
  472.   (newname "MiamiInit.info")
  473.  )
  474.  (copyfiles
  475.   (source (tackon #source-dir #to-copy))
  476.   (dest @default-dest)
  477.   (newname "MiamiRegister.info")
  478.  )
  479.  (copyfiles
  480.   (source (tackon #source-dir #to-copy))
  481.   (dest "ENV:Sys")
  482.   (newname "def_MiamiApp.info")
  483.  )
  484.  (copyfiles
  485.   (source (tackon #source-dir #to-copy))
  486.   (dest "ENV:Sys")
  487.   (newname "def_MiamiAppOnline.info")
  488.  )
  489.  (copyfiles
  490.   (source (tackon #source-dir #to-copy))
  491.   (dest "ENVARC:Sys")
  492.   (newname "def_MiamiApp.info")
  493.  )
  494.  (copyfiles
  495.   (source (tackon #source-dir #to-copy))
  496.   (dest "ENVARC:Sys")
  497.   (newname "def_MiamiAppOnline.info")
  498.  )
  499.  (set #to-copy "main/MiamiDx.guide.info") (P-copy-file)
  500.  (if (>= #icon-choice 3) (
  501.   (if (exists "ENV:Sys/def_amigaguide.info")
  502.    (copyfiles
  503.     (source "ENV:Sys/def_amigaguide.info")
  504.     (dest @default-dest)
  505.     (newname "MiamiDx.guide.info")
  506.    )
  507.   )
  508.  ))
  509. ))
  510.  
  511. (complete 85)
  512.  
  513. (P-set-tooltypes)
  514.  
  515. (complete 90)
  516.  
  517. (P-set-envvars)
  518.  
  519. (complete 95)
  520.  
  521. (P-add-to-startup)
  522.  
  523. (complete 100)
  524.  
  525. (exit "The installation of MiamiDx is finished. If you are "
  526.  "upgrading from an earlier version of MiamiDx then you need "
  527.  "to execute the Shell command `avail flush' or reboot your "
  528.  "computer before starting MiamiDx.")
  529.